home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group95b.txt
/
000080_icon-group-sender _Mon Jul 10 16:49:00 1995.msg
< prev
next >
Wrap
Internet Message Format
|
1995-09-18
|
12KB
Received: by cheltenham.cs.arizona.edu; Mon, 10 Jul 1995 15:11:54 MST
Message-Id: <9507101649.AA26606@ns1.computek.net>
Mime-Version: 1.0
Content-Length: 10945
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
Date: Mon, 10 Jul 95 16:49 CDT
From: gep2@computek.net
Subject: Snobol & System programming
To: karczma@calvin.info.unicaen.fr
Cc: icon-group@cs.arizona.edu
X-Mailer: SPRY Mail Version: 04.00.06.17
Errors-To: icon-group-errors@cs.arizona.edu
>Alors, tu as passe 9 ans a Paris. Je crois maintenant que tu as eu
quelques occasions to begin to hate cars. Muy bien.
Heheheh... claro que si, c'est dificil garer a Paris... I've now lived in
numerous places with quite different approaches to mass/public/personal transit
and it's given me some hopefully-worthwhile observations on the subject.
>Still, you are younger than I, although your computing career might be a bit
longer. The point is that I have been for some time a theoretical physicist.
Fun stuff...
>I don't think there is a consensus on the merits/demerits of the explicit
branching instruction as compared with while/select GodKnowsWhatElse. Do
whatever you choose, but - please - there are two points which make it
utterly impossible for me to adopt your attitude:
Fair enough, as long as you don't expect me to adopt yours...
>1. I teach programming languages, for many years already. Some structuring
methods are simply impossible to avoid if you try to convey the coding
strategies to the True Beginners.
Rubbish. People taught programming languages for DECADES before the arrival of
"structured programming concepts", and we did okay.
> Perhaps for you a "break" is clumsier than :(DEHORS),
It's not that it's necessarily clumsier, it's just a lot less obvious where
"break" transfers control to. If you have a goto :(DEHORS) and a label DEHORS,
then it's QUITE clear exactly where it's transferring to. There's not the
slightest ambiguity, and you don't have to trust indenting, or count brackets or
something to confirm things.
> but I assure you that polluting the lexical space of the
program with useless names is very harmful if you are a beginner.
I claim that a 30-line text processing program in SNOBOL4 (and which maybe has a
dozen labels in it) is FAR, FAR clearer than a 3500-line program in C
(containing maybe a hundred function names) to do the same thing. You seem to
think that labels are "pollution", I suggest that a lot of function names are
every bit as bad (and just imagine how many labels OR function names you'd need
in C to replicate the functionality of even a rather modest SNOBOL4 pattern
match statement).
> For the
specialists, 'adultes et vaccines', comme les Francais used to say there
is no problem, but if you teach, then you finally get stuck inside this
particular philosophy which promotes modular programming. Snobol4 doesn't.
(OK, OK, there are structuring preprocessors. But I don't like disguises).
That's all ANY programming language/compiler is. C programs end up finally
executing as GOTOs, just like SNOBOL4 or assembler or xBase or Pascal or Icon,
it doesn't matter WHAT your source code says.
>2. Have you ever tried to participate in a collective work, a program
written by a dozen persons, 20 pages of code each? Physicists do it
quite often.
That's important when you write a 10,000 line program. But note that VERY few
SNOBOL4 programs ever approach that length (the longest one I've written to date
is probably around 2000 lines). It's not that they COULDN'T, of course... it's
just that they VERY rarely NEED TO.
> There is a (small) probability that you finally get mad at ANY control
structures, not only at the jumps, but also at loops, computed gotos,
selects, etcaetera. Then, you might think about hiding everything in
Objects, or convert to a Functionalist/Logical Religion (independently
of whether you are circumsized or not...).
Frankly, I am quite pleased when I find that the language simply PROVIDES the
features (and discipline) I need... intrinsically... that's the BEST way to
'hide everything' and make the programmer's job as easy as possible.
> Icon might be used as a functional language, Perl also. There are some
object-oriented structured at hand: Idol, or the whole OO-ref package
of perl5. You can choose better your style.
I'll be glad to ignore Perl, thankyouverymuch.
>Style c'est l'homme, so I do not plan to get you into my sect, nor to teach
you anything. Anyway your attitude towards teachers seems to be ambiguously
negative,
I'm not down on teachers 'per se', I've had some VERY fine ones (as well as a
few REAL and TRUE dogs, I might add). I think it's unfortunate, however, that
so many teachers will teach AWK and Perl and ignore things like SNOBOL4 (which I
personally still consider a VERY attractive language) and Icon.
>There are still some touchy points which you seem to disregard a bit. ....
My problems are different, for example how to plug a program with textual output
through a named pipe to Gnuplot or Matlab to produce the high quality graphic
plots in a way transparent to the user. I can do it via Tcl or Perl. Where is
the power of Snobol4 in this context?
You can (at least -I- can) pipe input or output from SNOBOL4+ to other software
programs, (to the extent that anyone can under MS-DOS in any case). One could
even write a loadable module to do sprites and fast pixel graphics from SNOBOL4+
(although I've never felt the inclination/need to do so).
Of course, the type of work YOU do and the type of work I do might be quite
different, so YMMV. If you like Perl (and dislike SNOBOL4), then I can shake my
head in wonderment, but ultimately can't control a matter that's clearly a
question of your personal taste.
>I have to administrate a primitive, but multi-user database accessible through
WWW. this is an educative game where all users might try to update this
database concurrently. I need lockf's or other blessed fcntl protection
mechanisms; to make on the fly some symbolic links, to seek index files etc.
I cannot simply spawn an external process which would do that, because I have
to keep a permanent grip on the file handles. I really need a primitive
tool library. "C" has it. Perl as well. Where is the Snobol4 power?
If you can do it in C, there is NO reason you can't do it from SNOBOL4+ too.
You can load a module under SNOBOL4+ written in assembler, that can do ANYTHING
that any other assembler routine called from another language can do.
>Can you give me an example of ONE CGI script written in Snobol4?
I haven't looked, quite honestly. But I would assume that it's quite possible
to do one.
>B. Suppose you have a seminumerical problem to solve, a really nasty
asymptotic expansion problem (for example in computational physics).
The only *simple* way to program this is to use lazy semantics: streams or
lazy lists. You have them for example in this "less powerful" Scheme.
I didn't say that Scheme was "less powerful", I was talking about AWK and Perl.
So please don't put words in my mouth.
>You won't do them in Snobol4, and in Icon it is quite a task. Where is the
power?
And you'd write it in Perl, I expect. Right? If not, then what's your point?
>What about first-order continuations which you might use to emulate threads,
or apply in general to simulation programs? In Scheme you can do it.
Again, I'm not talking about Scheme. I never mentioned the language, someone
else did.
Sure, you can point up specific programming tasks for which any given language
is less than ideal. I never suggested that SNOBOL4 is perfect for everything.
But neither is ANY OTHER single language, either. Heck, I can throw together a
quick business database enter/update/inquire/report application in less than an
hour or two in FoxPro that would take someone weeks to do in C, (OR Scheme OR
whatever). Big deal. That doesn't mean that SNOBOL4 isn't ideal for a great
many everyday programming tasks (and in fact, that's what I've found to be
true).
>I do not understand (please: although my English is very far from perfect,
this is not the issue here) what do you mean by "people beating their noisy
drum for a pitiful substitute...".
I mean that there's a lot of people talking and making a big fuss about Perl and
Awk, and when you get right down to it, neither one of them is nearly as
interesting or useful (IMHO) as SNOBOL4 and Icon.
>I don't think that Perl protagonists are more conspicuous,
more agressive, less polite than many others.
They are certainly more conspicuous and more aggressive than the Icon and
SNOBOL4 fans are. And it's NOT because Awk and Perl are more interesting,
useful, or powerful languages... it's clear that they are NOT. When I was back
at Datapoint in R&D, I watched a friend and colleague... a REALLY NICE GUY...
get verbally attacked and repeatedly badmouthed by another programmer there.
The nice guy never rose up to defend himself (it wasn't his style) and
eventually people started to believe the loudmouth asshole. So the nice guy
finally got fired. Moral of the story? Don't let the loudmouths win by
default, just because they make their presence felt more. Speak up for the
little guys, the less-well-known, nicer alternatives. Don't allow yourself to
get swept along in a tide, just because "everyone's doing it".
>You see, I am from Poland.
Welcome. I have many friends from (and still) there.
>...one of the major points of my personal philosophy (you see,
I have really had un coup d'oeil on your home-page) is the tolerance. I would
never permit myself to accuse anybody of using a "pitiful substitute" of a
programming language, because I would ask myself first: what do i want
really? To offend him? To convince him? To prove that I am better than he?
I primarily promote SNOBOL4 and Icon among my programming friends because I hope
that they will find those languages useful and helpful, and because teaching a
language to others (or interesting them in it) is a way to help keep a language
alive.
>Well, perhaps to make him think a bit. But is this a good way?
In the case of SNOBOL4 and Icon, yes I think it is. I know that on FIDOnet and
Intelec, a lot of people learned about SNOBOL4 and Icon because of me, that
wouldn't have ever looked into them otherwise. And I know several friends there
in Paris who nowadays use SNOBOL4 on at least an occasional basis that wouldn't
have ever learned about the languages otherwise.
One thing I have learned from the experience is that a lot of people cling
DOGGEDLY to their old [t]rusty programming tools. You wouldn't believe how many
loons claim they prefer PDS Basic to something like SNOBOL4 or Icon. And, I
must confess, for some (even quite lucrative) programming projects, I'll use
xBASE or even Databus as my preferred language... not because the language
itself is particularly elegant, but because for certain types of jobs, it simply
is the easiest, fastest, and most productive way to solve a problem and move
forward.
In any case, it's been interesting chatting with you about this stuff. I'm
going ahead and copying the rest of the Icon group, in hopes that some of them
will find it interesting too.
Gordon Peterson
http://www.computek.net/public/gep2/